<%--
	fileName      : personal_zoomimageup.jsp
	author        : kfzx-liukai
	createDate    : 2010-6-25  上午02:55:37
	lastModifier  : kfzx-liukai
	lastModifyDate: 2010-6-25  上午02:55:37
	description   : 请添加描述
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="ctp-tag" prefix="ctp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title><ctp:label key="user_zoomimageup"/></title>
		<ctp:include items="borderlayout,zoomimageup,toolbar,button"/>
        <script type='text/javascript' kind='variant'>		  
		    //================================UI变量定义片段============================================================
			var ctpBorderlayout;//页面框架布局器
			var ctpZoomimageup;//头像上传
			var ctpToolbar;//工具条
		</script>
		<script type='text/javascript' kind='event'>
			//================================函数定义片段============================================================
			var zoomSrc;
			var zoomCutSrc;
			/**
	         * 取消按钮
	         * @version	 1.0
	         * @since	 1.0
	         * @author	kfzx-liukai           
	         */
			function btnCancel(){               
				var _fnContext = "personal_zoomimageup.jsp" + "->btnCancel()";
				try {                  
				    document.queryPersonal.submit();
				} 
				catch (e) {
				    ctp.core.log.err(_fnContext, e.message);
				}  
			}
		</script>
		<script type='text/javascript' kind='notUi'>
			//================================非UI组件定义片段==========================================================
		</script>
		<script type='text/javascript' kind='ui'>
			//================================UI组件定义片段============================================================
			/**
             * 创建UI组件
             * @version	 1.0
             * @since	 1.0
             * @author	kfzx-liukai           
             */		    
		    function initUI(){
		    	var _mContext = "personal_zoomimageup.jsp -> initUI()";
           	 	try {
               	 	var zoomPath = '<ctp:out name="zoomPath"/>';
               	 	var zoomCutPath = '<ctp:out name="zoomCutPath"/>';
               	 	if(zoomPath){
               	 		zoomSrc = $('#fullFilePathZoom').val();
                   	}else{
                   		zoomSrc = '';
                    }
               	 	if(zoomCutPath){
               	 		zoomCutSrc = $('#fullFilePathZoomCut').val();
                	}else{
                		zoomCutSrc = '';
                 	}
					ctpBorderlayout = new ctp.ui.borderlayout({
		                    type: "3T",
		                    north__size: 0.06,
							center__scrollable: true
		                });
					ctpBorderlayout.create();
					ctpToolbar = new ctp.ui.toolbar({
		       	 		leftItems :[
				    		{
								id:"_toolbar_button_cancel",
						    	type : 'button',
						        text : '<ctp:label key="return"/>',
						        icon : 'back',
						        onClick : btnCancel
			                }
					    ],            			
						renderTo:ctpBorderlayout.panes.north				   
					});
					ctpZoomimageup = new ctp.ui.zoomimageup({
						id:'zoomimageup1',
						extFilter:'jpg | bmp/i',
						uploadId:'imagefileup',
						cutId:'imagefilecut',
						zoomSrc:zoomSrc,
						imgSrc:zoomCutSrc,
						renderTo:'body',
						leftBar:'150px',
						factor:'50',
						imgOutterWidth:'300px',
						imgOutterHeight:'300px',
						imgInnerWidth:'160px',
						imgInnerHeight:'200px',
						zoomWidth:'120px',
						zoomHeight:'150px',
						minFactor:0.06,
						maxFactor:30,
						imgRenderTo:ctpBorderlayout.panes.center,
						fileupRenderTo:ctpBorderlayout.panes.center,
						zoomRenderTo:ctpBorderlayout.panes.west
					});
           	 	}
	        	catch (e) {
	            	ctp.core.log.err(_mContext, e.message);
	            }
			}
		</script>  	
	</head>
	<body onload='initUI()'>
		
		<ctp:form name="imageup" method="post" action="picUpload/personal.flowc" flowActionName="zoomimageup" enctype="multipart/form-data">
			<div id='imagefileup'></div>
			
		</ctp:form>
		<ctp:form name="imagecut" method="post" action="personal.flowc" flowActionName="zoomimagecut" enctype="multipart/form-data">
			<div id='imagefilecut'></div>
			<input type="hidden" name='xPosition' id='xPosition'/>
			<input type="hidden" name='yPosition' id='yPosition'/>
			<input type="hidden" name='destWidth' id='destWidth'/>
			<input type="hidden" name='destHeight' id='destHeight'/>
		</ctp:form>
		<ctp:form name="queryPersonal" method="post" action="personal.flowc" flowActionName="queryPersonal">
			
		</ctp:form>
		<input type="hidden" id="fullFilePathZoom" value='<ctp:out name='fullPath'/><ctp:out name="zoomPath"/>'/>
		<input type="hidden" id="fullFilePathZoomCut" value='<ctp:out name='fullPath'/><ctp:out name="zoomCutPath"/>'/>
		
	</body>
</html>

<%--
	date        :
	modifyReason:
--%>